﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pong.Core.Biz
{
    public class Engine
    {
        public bool Running { get; private set; }


        public void Start()
        {
            Running = true;
            var bizs = BizFactory.Instance.GetAll(this);
            while (Running)
                foreach (var b in bizs)
                    if (Running)
                        b.Tick();
        }

        public void Stop()
        {
            Running = false;
        }
    }
}
